package com.lunm.im.menu;

import com.lunm.im.massage.*;

/**
 * @program: mi-server
 * @author: Shawn
 * @create: 2024-12-27 21:43
 */
public enum InstructionType {
    LOGIN_REQUEST(LoginRequestMessage.class),
    LOGIN_RESPONSE(LoginResponseMessage.class),
    CHAT_REQUEST(ChatRequestMessage.class),
    CHAT_RESPONSE(ChatResponseMessage.class),
    GROUP_CREATE_REQUEST(GroupCreateRequestMessage.class),
    GROUP_CREATE_RESPONSE(GroupCreateResponseMessage.class),
    GROUP_CHAT_REQUEST(GroupChatRequestMessage.class),
    GROUP_CHAT_RESPONSE(GroupChatResponseMessage.class),
    GROUP_MEMBERS_REQUEST(GroupMembersRequestMessage.class),
    GROUP_MEMBERS_RESPONSE(GroupMembersResponseMessage.class),
    GROUP_JOIN_REQUEST(GroupJoinRequestMessage.class),
    GROUP_JOIN_RESPONSE(GroupJoinResponseMessage.class),
    GROUP_QUIT_REQUEST(GroupQuitRequestMessage.class),
    GROUP_QUIT_RESPONSE(GroupQuitResponseMessage.class),
    PING(PingMessage.class),
    PONG(PongMessage.class),
    RPC_REQUEST(RpcRequestMessage.class),
    RPC_RESPONSE(RpcResponseMessage.class);

    InstructionType(Class<? extends Message> messageClass) {
        this.messageClass = messageClass;
    }

    private Class<? extends Message> messageClass;

    public Class<?> getMessageClass() {
        return messageClass;
    }
}
